package com.tencent.wxcloudrun.exception;

import cn.hutool.core.util.StrUtil;

public interface ErrorCode {
    int getEc();

    String getEm();

    static String getDescribe(ErrorCode errorCode, Object... params) {
        return StrUtil.format(errorCode.getEm(), params);
    }

    static String getFullMessage(ErrorCode errorCode, Object... params) {
        return "ec:" + errorCode.getEc() + ", em:" + getDescribe(errorCode, params);
    }
}
